#include <iostream>
#include<string>;
using namespace std;
string result(string s) {
    string s2;
    if (s[0] >= 97 && s[0] <= 122) {
        char tmp = s[0] - 32;
        s2 += tmp;
    }
    else {
        s2 += s[0];
    }
    for (int i = 0; i < s.size(); i++) {
        if (s[i] == ' '&& i+1!=s.size()) {
            if (s[i + 1] >= 97 && s[i + 1] <= 122) {
                char tmp = s[i + 1] - 32;
                s2 += tmp;
            }
            else {
                s2 += s[i + 1];
            }
        }
    }
    return s2;
}


int main() {
    string s1;
    getline(cin, s1);
    string s2(result(s1));
    cout << s2 << endl;
    return 0;
}